import { createRouter, createWebHistory } from 'vue-router'
import MainLayout from '@/layouts/MainLayout.vue'
import Dashboard from '@/views/Dashboard.vue'
import AIPrediction from '@/views/AIPrediction.vue'
import Alerts from '@/views/Alerts.vue'
import DeviceManagement from '@/views/DeviceManagement.vue'
import Settings from '@/views/Settings.vue'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      component: MainLayout,
      children: [
        {
          path: '',
          redirect: '/dashboard'
        },
        {
          path: 'dashboard',
          name: 'Dashboard',
          component: Dashboard
        },
        {
          path: 'prediction',
          name: 'AIPrediction',
          component: AIPrediction
        },
        {
          path: 'alerts',
          name: 'Alerts',
          component: Alerts
        },
        {
          path: 'devices',
          name: 'DeviceManagement',
          component: DeviceManagement
        },
        {
          path: 'settings',
          name: 'Settings',
          component: Settings
        }
      ]
    }
  ]
})

export default router 